package com.dream.libxrec.encode.video;

import android.content.Context;

public abstract class IVideoEncoder {

    public abstract void init(Context ct,int width, int height,
                              boolean isVBR,int bitRate);

    public abstract void addIEncoderListener(IVideoEncoderListener listener);

    public abstract void encode(byte[] nv12,int offset,int size);
    public abstract void encode(byte[] nv12,int offset,
                                int size,long presentationTimeUs);
    public abstract void start();

    /**
     * 是否已经启动
     * @return
     */
    public abstract boolean isRun();

    public abstract void stop();

}
